package dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import pojo.Student;
import java.util.Date;
import java.util.List;

public interface StudentDao {
    // 定义行为  crud
    // 查询用户
//    List<Student> findAll();
    /*List<Student> findAll1(@Param("student_num")String studentNum, @Param("student_name") String studentName,
                          @Param("gender") String gender,@Param("age") int age,@Param("date_of_birth") Date birthday,
                          @Param("class_id") int classId, @Param("hostel_id") int hostelId,@Param("phone") String phone,
                          @Param("email") String email,@Param("home_address") String homeAddress,@Param("emergency_contact") String emergencyContact,
                          @Param("emergency_contact_phone") String emergencyContactPhone,@Param("major") String major,@Param("status") String status,
                          @Param("del_flag") String delFlag,@Param("create_by") String createBy,@Param("create_time") Date createTime,
                          @Param("update_by") String updateBy,@Param("update_time") Date updateTime,@Param("remark") String remark,@Param("offset")int offset, @Param("pageSize") int PageSize);*/
    List<Student> findAll2(@Param("student") Student student, @Param("offset")int offset, @Param("pageSize")int pageSize);
    //List<Student> findAll3(@Param("offest") int offest, @Param("pageSize") int pageSize);
    Student findById(Integer id);


    int count(Student student);

    int login(Student student);

    int addStudent(Student student);

    int deleteStudentById(Integer id);

    int updateStudent(Student student);

}
